import type { JSExpression, JSFunction } from '../types';
export const isSimpleValue = (data: any) => {
  const v = typeof data;
  if (v === 'object' && !data) {
    return true;
  }
  return ['boolean', 'string', 'number', 'undefined'].includes(v);
};
export const isJSExpression = (data: any): data is JSExpression => {
  return data && typeof data === 'object' && data.type === 'JSExpression';
};
export const isJSFunction = (data: any): data is JSFunction => {
  return data && typeof data === 'object' && data.type === 'JSFunction';
};
